/**
 * Created by shunchen_yang on 16/10/25.
 */
UE.registerUI('xiumidialog', function (editor, uiName) {
  var btn = new UE.ui.Button({
      name   : 'xiumi-connect',
      title  : '秀米',
      onclick: function () {
          var dialog = new UE.ui.Dialog({
              iframeUrl: window.publicPath + 'ueditor/xiumi-ue-dialog-v5.html',
              editor   : editor,
              name     : 'xiumi-connect',
              title    : "秀米",
              cssRules : "width: " + (window.innerWidth - 60) + "px;" + "height: " + (window.innerHeight - 60) + "px;",
          });
          dialog.render();
          dialog.open();
      }
  });

  return btn;
});
